package com.zhh.front.view.center;

import org.apache.commons.lang3.time.DateFormatUtils;

import java.math.BigDecimal;
import java.util.Date;

public class IncomeResultView {
    private Integer id;
    private String product; //项目名称
    private String incomeDate; //收益日期
    private BigDecimal incomeMoney; //收益金额

    public IncomeResultView(Integer id, Integer product, Date incomeDate, BigDecimal incomeMoney) {
        this.id = id;

        this.incomeMoney = incomeMoney;//投资金额

        if(incomeDate != null){
            this.incomeDate = DateFormatUtils.format(incomeDate,"yyyy-MM-dd");//投资时间
        }

        switch(product){//投资产品
            case 0:
                this.product = "新手宝";
                break;
            case 1:
                this.product = "优选产品";
                break;
            case 2:
                this.product = "散标产品";

        }
    }

    public Integer getId() {
        return id;
    }

    public String getProduct() {
        return product;
    }

    public String getIncomeDate() {
        return incomeDate;
    }

    public BigDecimal getIncomeMoney() {
        return incomeMoney;
    }
}
